package com.example.siyun.service.impl.courseauitserviceimpl;

import com.example.siyun.mapper.courseauditmapper.CourseAuditMapper;
import com.example.siyun.pojo.CourseAudit;
import com.example.siyun.service.courseauditservice.CourseAuitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
/**
 * @Auther: 全
 * @Date: 2022/9/26 09:33
 * @Description:教师模块课程核查
 */
@Service
public class CourseAuitServiceImpl implements CourseAuitService {
    @Autowired
    private CourseAuditMapper courseAuditMapper;
    /**
     * 添加课程核查信息
     * @param courseAudit 要添加的客户核查信息
     */
    @Transactional
    @Override
    public void courseAuditAdd(CourseAudit courseAudit) {
        courseAuditMapper.courseAuditAdd(courseAudit);
    }
    /**
     * 修改核查状态
     * @param aid 要修改的课程id,shstatus要修改的状态
     */
    @Transactional
    @Override
    public void courseAuditStatus(int shstatus,int aid) {
        courseAuditMapper.courseAuditStatus(shstatus,aid);
    }
    /**
     * 通过id查询对应的课程审核信息
     * @param id 要查询的课程核查信息id
     */
    @Transactional
    @Override
    public List<CourseAudit> findAuditById(int id) {
        return courseAuditMapper.findAuditById(id);
    }
}
